package com.sise.stuteaintersys.service;

import com.github.pagehelper.PageInfo;
import com.sise.stuteaintersys.bean.base.ModifyResponse;
import com.sise.stuteaintersys.bean.entity.*;
import com.sise.stuteaintersys.bean.protocol.NetResult;
import com.sise.stuteaintersys.bean.vo.ExamResultVO;
import com.sise.stuteaintersys.bean.vo.HomeworkDateVO;
import com.sise.stuteaintersys.bean.vo.HomeworkResultVO;

import java.io.File;
import java.util.Date;
import java.util.List;

/**
 * @ClassName TeacherService
 * @Description
 * @Date 2019/1/3 16:32
 * @Version 1.0
 **/
public interface TeacherService {

//课程
    /**
     *  获得课程内容
     *
     *@param id
     *@return Course
     *@date 2019/1/4
     *@time 20:58
     */
    Course getCourseById(Integer id);

    /**
     *  老师正在上课的课程
     *
     *@param id
     *@return
     *@date 2019/1/4
     *@time 10:50
     */
    PageInfo<Course>listCourse(Integer pageNum,Integer pageSize,Integer id);
    /**
     *  已经完成的课程
     *
     *@param id
     *@return
     *@date 2019/1/7
     *@time 22:03
     */
    PageInfo<Course> finishedCourse(Integer pageNum,Integer pageSize, Integer id);
    /**
     * 增加课程
     * 
     *@param course
     *@return ModifyResponse
     *@date 2019/1/4
     *@time 13:33
     */
    ModifyResponse insertCourse(Course course);
    /**
     * 修改课程
     *
     *@param course
     *@return ModifyResponse
     *@date 2019/1/4
     *@time 13:33
     */
    ModifyResponse updateCourse(Course course);
    /**
     * 删除课程
     *
     *@param id
     *@return ModifyResponse
     *@date 2019/1/4
     *@time 13:33
     */
    ModifyResponse deleteCourse(Integer id);

//作业

    /**
     *  作业列表
     *
     *@param courseId
     *@return     List<String>
     *@date 2019/1/6
     *@time 15:33
     */
    PageInfo<HomeworkDateVO> listHomework(Integer pageNum, Integer pageSize, Integer courseId);

    /**
     *  一次作业的题目
     *
     *@param date
     *@return List<Homework>
     *@date 2019/1/6
     *@time 15:34
     */
    List<Homework> getHomework(Date date,Integer courseId);
    /**
     * 增加作业(多条题目)
     * 
     *@param list
     *@return ModifyResponse
     *@date 2019/1/4
     *@time 13:36
     */
    ModifyResponse insertHomework(String list);

    /**
     * 更新作业
     *
     *@param homework
     *@return ModifyResponse
     *@date 2019/1/4
     *@time 13:36
     */
    ModifyResponse updateHomework(Homework homework);

    /**
     * 删除一条作业
     *
     *@param id
     *@return boolean
     *@date 2019/1/4
     *@time 13:36
     */
    ModifyResponse deleteHomework(Integer id);
    /**
     *  删除一天的作业
     *
     *@param
     *@return
     *@dateTime 2019/1/8 17:53
     */
    ModifyResponse deleteListHomework(Date date);

    /**
     *  查看作业的完成情况
     *
     *@param
     *@return
     *@dateTime 2019/1/18 19:12
     */
    List<HomeworkResult> listHomeworkResult(Integer courseId);

    /**
     *  查看某一份作业的详细情况
     *
     *@param
     *@return
     *@dateTime 2019/1/18 19:30
     */
    HomeworkResultVO findResultContent(Date date,Integer courseId,Integer studentId);
//试卷
    /**
     *  返回课程的试卷套
     *
     *@param  pageNum
     *@param  pageSize
     *@param  courseId 课程编号
     *@return 返回课程的试题套
     *@date 2019/1/1
     *@time 22:36
     */
    PageInfo<ExamCourse> listExam(Integer pageNum, Integer pageSize, Integer courseId);
    /**
     * 显示试卷内容
     *
     *@param examType
     *@return List<Question>
     *@date 2019/1/3
     *@time 12:01
     */
    List<Question> listQuestion(String examType,String id);

    /**
     *  自动生成试卷
     *
     *@param course
     *@return ModifyResponse
     *@date 2019/1/6
     *@time 16:07
     */
    ModifyResponse insertExam(ExamCourse course);

    /**
     *  删除试卷
     *
     *@param
     *@return
     *@dateTime 2019/1/8 21:10
     */
    ModifyResponse deleteExam(ExamCourse course);

    /**
     *  返回考试情况
     *
     *@param
     *@return
     *@dateTime 2019/1/18 18:36
     */
    List<ExamResult> listResult(Integer courseId);

    /**
     *  查看某位考生某一次考试的详情
     *
     *@param
     *@return
     *@dateTime 2019/1/18 19:37
     */
    ExamResultVO findExamResult(String examType, Integer courseId, Integer studentId);
//留言板

    PageInfo<Message> listMessage(Integer pageNum, Integer pageSize,Integer id);

    NetResult responseMessage(Message message);

//获取全部专业方向
    List<ProfessionType> listProfession();

    /**
     * 获取excel文件，将信息导入数据库
     * @param file
     * @return
     */
    boolean saveExcelInfo(File file, Integer courseId) throws Exception;

}
